<div class="contents">
  <ol class="breadcrumb">
    <li><a href="#/index/panel">首页</a></li>
    <li><a href="#/fa/downline/list">所有列表</a></li>
    <li>
      <span ng-if="!id">添加名单</span>
      <span ng-if="id">名单详情</span>
    </li>
  </ol>
  <form class="form-horizontal" role="form" name="form" ng-submit="save()" novalidate>
    <div class="form-group" ng-class="{'has-error': form.mobile.$dirty && form.mobile.$invalid}">
      <label class="col-sm-2 control-label"><span class="required">*</span>手机号码</label>
      <div class="col-sm-5">
        <input ng-disabled="id" type="text" class="form-control" maxlength="11" name="mobile" ng-model="item.mobile" required="required" ng-pattern="/^\d{11}$/">
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-2 control-label">姓名</label>
      <div class="col-sm-5">
        <input ng-disabled="!edit && id" ng-model="item.name" type="text" class="form-control" name="name">
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-2 control-label">公司</label>
      <div class="col-sm-5">
        <input ng-disabled="!edit && id" ng-model="item.companyName" type="text" class="form-control" name="companyName">
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-2 control-label">公司地址</label>
      <div class="col-sm-5">
        <input ng-disabled="!edit && id" ng-model="item.companyAdd" type="text" class="form-control" name="companyAdd">
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-2 control-label">职位</label>
      <div class="col-sm-5">
        <input ng-disabled="!edit && id" ng-model="item.job" type="text" class="form-control" name="job">
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-2 control-label">邮箱</label>
      <div class="col-sm-5">
        <input ng-disabled="!edit && id" ng-model="item.email" type="text" class="form-control" name="email">
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-2 control-label">微信号</label>
      <div class="col-sm-5">
        <input ng-disabled="!edit && id" ng-model="item.weChat" type="text" class="form-control" name="weChat">
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-2 control-label">性别</label>
      <div class="col-sm-5">
        <select class="form-control" name="sex" ng-model="item.sex" ng-disabled="!edit && id">
          <option value="3">隐私</option>
          <option value="1">男</option>
          <option value="2">女</option>
        </select>
      </div>
    </div>
    <div class="form-group" ng-class="{'has-error': form.mediaSource.$dirty && form.mediaSource.$invalid}">
      <label class="col-sm-2 control-label"><span class="required">*</span>名单来源</label>
      <div class="col-sm-5">
        <input ng-disabled="!edit && id" ng-model="item.mediaSource" type="text" class="form-control" name="mediaSource" required="required">
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-2 control-label">备注</label>
      <div class="col-sm-5">
        <textarea class="form-control" name="remark" ng-model="item.remark" ng-disabled="!edit && id"></textarea>
      </div>
    </div>
    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-5">
        <button type="submit" class="btn btn-primary" ng-if="!id">提交</button>
        <button type="button" class="btn btn-primary" ng-if="edit && id" ng-click="upData()">修改</button>
        <button type="button" class="btn btn-primary" ng-click="edit=true" ng-show="!edit && id">编辑</button>
        <a  class="btn btn-primary" ng-href="#/fa/downline/list" ng-if="!edit && id">返回列表</a>
      </div>
    </div>
  </form>
</div>
<div class="layer-box" ng-show="showBlackAddFormFlag">
  <div class="layer-bg">1111</div>
  <div class="layer-con" style="padding:10px 20px;">
    <h4 style="font-size: 14px;padding-bottom: 5px;">请确认提交信息</h4>
    <div class="row" ng-if="item.mobile">
      <label class="col-sm-4" style="text-align: right">手机号：</label>
      <div  class="col-sm-8" style="text-align: left;padding-left: 0">{{item.mobile}}</div>
    </div>
    <div class="row" ng-if="item.name">
      <label class="col-sm-4" style="text-align: right">姓名：</label>
      <div  class="col-sm-8" style="text-align: left;padding-left: 0">{{item.name}}</div>
    </div>
    <div class="row" ng-if="item.email">
      <label class="col-sm-4" style="text-align: right">邮箱：</label>
      <div  class="col-sm-8" style="text-align: left;padding-left: 0">{{item.email}}</div>
    </div>
    <div class="row" ng-if="item.weChat">
      <label class="col-sm-4" style="text-align: right">微信号：</label>
      <div  class="col-sm-8" style="text-align: left;padding-left: 0">{{item.weChat}}</div>
    </div>
    <div class="row" ng-if="item.companyName">
      <label class="col-sm-4" style="text-align: right">公司：</label>
      <div  class="col-sm-8" style="text-align: left;padding-left: 0">{{item.companyName}}</div>
    </div>
    <div class="row" ng-if="item.job">
      <label class="col-sm-4" style="text-align: right">职位：</label>
      <div  class="col-sm-8" style="text-align: left;padding-left: 0">{{item.job}}</div>
    </div>
    <div class="row" ng-if="item.companyAdd">
      <label class="col-sm-4" style="text-align: right">公司地址：</label>
      <div  class="col-sm-8" style="text-align: left;padding-left: 0">{{item.companyAdd}}</div>
    </div>
    <div class="row" ng-if="item.mediaSource">
      <label class="col-sm-4" style="text-align: right">名单来源：</label>
      <div  class="col-sm-8" style="text-align: left;padding-left: 0">{{item.mediaSource}}</div>
    </div>
    <div class="row" ng-if="item.remark">
      <label class="col-sm-4" style="text-align: right">备注：</label>
      <div  class="col-sm-8" style="text-align: left;padding-left: 0">{{item.remark}}</div>
    </div>
    <div class="con-wrap">
        <div class="form-group" >
          <button class="btn btn-primary" ng-click="save()">确认提交</button>
          <button class="btn btn-primary" ng-click="showBlackAddFormFlag = false">取消提交</button>
        </div>
    </div>
  </div>
</div> 
